[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _rotr()                 Rotate a Value to the Right

 #include <stdlib.h>

 unsigned   _rotr(value,count);
 unsigned   value;
 int        count;

    _rotr() rotates an unsigned 'value' to the right by 'count' bits.

       Returns:     The rotated value.

   -------------------------------- Example ---------------------------------

    The following statements rotate 'val' by 'count' bits.

           #include <stdlib.h>

           main()
               {
               unsigned val = 0xAA;
               int count = 1;

               printf("rotate %04X %d bit(s) = %04X \n",
                         val,count,_rotr(val,count));
               }


See Also: _lrotl() _lrotr() _rotl()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson